<style>
	.btn{
		height: 28px;
        line-height: 28px;
        margin: 0px 25px 0;
        padding: 0px 15px;
        border: 1px solid #dedede;
        color: #FFFFFF;
        border-radius: 2px;
        font-weight: 400;
        cursor: pointer;
        text-decoration: none;
        background: #5cb85c;
        border-color: ##5cb85c;
	}
	.btn:hover{
		color: #FFFFFF;
	}
	.btn:link{
		color: #FFFFFF;
	}
</style>
<{include file="tpl/filter.tpl"}>
<div>	
    <a class="label-success pull-right" style="color: #fff; padding: 0 4px;" href="<{PubFunc::buildUrl('/oss/?r=codePool/add')}>">
        <i class="fa fa-plus"></i> 添加激活码池
    </a>
</div>
	
<{include file="tpl/grid.tpl"}>
	





<script>
    $(function(){
       $(document).on("click", 'a[name="code_view"]', function (e) {
       //$('a[name="code_view"]').click(function(){
       	    var g = $('input[name="g"]').val();
    		var id = $(this).attr('data-id');
    		var url = '?r=codePool/code_view&g='+g+'&id='+id;
    		layer.open({
    			skin: 'layui-layer-molv'
    			,type: 2
    			,area: ['700px', '600px']
    			,title:'激活码'
    			,content: url
    			,btn: ['确定']   			
    		});
       });
       
       //导出
       $(document).on("click", 'a[name="export"]', function (e) {
       	   var g = $('input[name="g"]').val();
       	   var id = $(this).attr('data-id');
       	   var url = '?r=codePool/export&g='+g+'&id='+id;
       	   window.open(url);
       });
       
    });
    
    
    
</script>